package com.freshcity.core
{
	import com.freshcity.component.guide.GuideTipsManager;
	import com.freshcity.manager.EffectManager;

	public class BaseGuide
	{
		protected var host:MainScene;
		protected var _callBack:Function;
		protected var _callBackPara:Array;
		
		public function setCallBack(fun:Function,para:*=null):void
		{
			_callBack = fun;
			this._callBackPara = para;
		}
		
		public function finishGuide():void
		{
			host.commu.send(OpCodes.GUIDE_DONE, {});
		}		
		
		public function clear():void
		{
			EffectManager.hideUIMask();
			host.guideTip.hideGuideTips();
			GuideTipsManager.hideLineBoxTips();
			if (this._callBack != null) 
			{
				_callBack.apply(null,_callBackPara);
				finishGuide();
				this._callBack = null;
			}
		}
		
	}
}